Optimal. Leaf size=330 \[ -\frac {(3 A b-a B) x}{a^4}-\frac {\left (15 a^2 A b^4-6 A b^6+6 a^5 b B-5 a^3 b^3 B+2 a b^5 B-2 a^6 C-a^4 b^2 (12 A+C)\right ) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^4 (a-b)^{5/2} (a+b)^{5/2} d}-\frac {\left (11 a^2 A b^2-6 A b^4-5 a^3 b B+2 a b^3 B-a^4 (2 A-3 C)\right ) \sin (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}-\frac {\left (3 A b^4+4 a^3 b B-a b^3 B-2 a^4 C-a^2 b^2 (6 A+C)\right ) \sin (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 2.19, antiderivative size = 330, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {4185, 4189,
4004, 3916, 2738, 214} \begin {gather*} -\frac {x (3 A b-a B)}{a^4}+\frac {\sin (c+d x) \left (A b^2-a (b B-a C)\right )}{2 a d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}-\frac {\sin (c+d x) \left (-\left (a^4 (2 A-3 C)\right )-5 a^3 b B+11 a^2 A b^2+2 a b^3 B-6 A b^4\right )}{2 a^3 d \left (a^2-b^2\right )^2}-\frac {\sin (c+d x) \left (-2 a^4 C+4 a^3 b B-a^2 b^2 (6 A+C)-a b^3 B+3 A b^4\right )}{2 a^2 d \left (a^2-b^2\right )^2 (a+b \sec (c+d x))}-\frac {\left (-2 a^6 C+6 a^5 b B-a^4 b^2 (12 A+C)-5 a^3 b^3 B+15 a^2 A b^4+2 a b^5 B-6 A b^6\right ) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^4 d (a-b)^{5/2} (a+b)^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 2738
Rule 3916
Rule 4004
Rule 4185
Rule 4189
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx &=\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}-\frac {\int \frac {\cos (c+d x) \left (3 A b^2-a b B-a^2 (2 A-C)+2 a (A b-a B+b C) \sec (c+d x)-2 \left (A b^2-a (b B-a C)\right ) \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^2} \, dx}{2 a \left (a^2-b^2\right )}\\ &=\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}-\frac {\left (3 A b^4+4 a^3 b B-a b^3 B-2 a^4 C-a^2 b^2 (6 A+C)\right ) \sin (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))}+\frac {\int \frac {\cos (c+d x) \left (-11 a^2 A b^2+6 A b^4+5 a^3 b B-2 a b^3 B+a^4 (2 A-3 C)+a \left (A b^3+2 a^3 B+a b^2 B-a^2 b (4 A+3 C)\right ) \sec (c+d x)-\left (3 A b^4+4 a^3 b B-a b^3 B-2 a^4 C-a^2 b^2 (6 A+C)\right ) \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx}{2 a^2 \left (a^2-b^2\right )^2}\\ &=-\frac {\left (11 a^2 A b^2-6 A b^4-5 a^3 b B+2 a b^3 B-a^4 (2 A-3 C)\right ) \sin (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}-\frac {\left (3 A b^4+4 a^3 b B-a b^3 B-2 a^4 C-a^2 b^2 (6 A+C)\right ) \sin (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))}-\frac {\int \frac {2 \left (a^2-b^2\right )^2 (3 A b-a B)+a \left (3 A b^4+4 a^3 b B-a b^3 B-2 a^4 C-a^2 b^2 (6 A+C)\right ) \sec (c+d x)}{a+b \sec (c+d x)} \, dx}{2 a^3 \left (a^2-b^2\right )^2}\\ &=-\frac {(3 A b-a B) x}{a^4}-\frac {\left (11 a^2 A b^2-6 A b^4-5 a^3 b B+2 a b^3 B-a^4 (2 A-3 C)\right ) \sin (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}-\frac {\left (3 A b^4+4 a^3 b B-a b^3 B-2 a^4 C-a^2 b^2 (6 A+C)\right ) \sin (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))}-\frac {\left (15 a^2 A b^4-6 A b^6+6 a^5 b B-5 a^3 b^3 B+2 a b^5 B-2 a^6 C-a^4 b^2 (12 A+C)\right ) \int \frac {\sec (c+d x)}{a+b \sec (c+d x)} \, dx}{2 a^4 \left (a^2-b^2\right )^2}\\ &=-\frac {(3 A b-a B) x}{a^4}-\frac {\left (11 a^2 A b^2-6 A b^4-5 a^3 b B+2 a b^3 B-a^4 (2 A-3 C)\right ) \sin (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}-\frac {\left (3 A b^4+4 a^3 b B-a b^3 B-2 a^4 C-a^2 b^2 (6 A+C)\right ) \sin (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))}-\frac {\left (15 a^2 A b^4-6 A b^6+6 a^5 b B-5 a^3 b^3 B+2 a b^5 B-2 a^6 C-a^4 b^2 (12 A+C)\right ) \int \frac {1}{1+\frac {a \cos (c+d x)}{b}} \, dx}{2 a^4 b \left (a^2-b^2\right )^2}\\ &=-\frac {(3 A b-a B) x}{a^4}-\frac {\left (11 a^2 A b^2-6 A b^4-5 a^3 b B+2 a b^3 B-a^4 (2 A-3 C)\right ) \sin (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}-\frac {\left (3 A b^4+4 a^3 b B-a b^3 B-2 a^4 C-a^2 b^2 (6 A+C)\right ) \sin (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))}-\frac {\left (15 a^2 A b^4-6 A b^6+6 a^5 b B-5 a^3 b^3 B+2 a b^5 B-2 a^6 C-a^4 b^2 (12 A+C)\right ) \text {Subst}\left (\int \frac {1}{1+\frac {a}{b}+\left (1-\frac {a}{b}\right ) x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{a^4 b \left (a^2-b^2\right )^2 d}\\ &=-\frac {(3 A b-a B) x}{a^4}+\frac {\left (12 a^4 A b^2-15 a^2 A b^4+6 A b^6-6 a^5 b B+5 a^3 b^3 B-2 a b^5 B+2 a^6 C+a^4 b^2 C\right ) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^4 (a-b)^{5/2} (a+b)^{5/2} d}-\frac {\left (11 a^2 A b^2-6 A b^4-5 a^3 b B+2 a b^3 B-a^4 (2 A-3 C)\right ) \sin (c+d x)}{2 a^3 \left (a^2-b^2\right )^2 d}+\frac {\left (A b^2-a (b B-a C)\right ) \sin (c+d x)}{2 a \left (a^2-b^2\right ) d (a+b \sec (c+d x))^2}-\frac {\left (3 A b^4+4 a^3 b B-a b^3 B-2 a^4 C-a^2 b^2 (6 A+C)\right ) \sin (c+d x)}{2 a^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 7.14, size = 1015, normalized size = 3.08 \begin {gather*} -\frac {2 (3 A b-a B) x (b+a \cos (c+d x))^3 \sec (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a^4 (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) (a+b \sec (c+d x))^3}+\frac {\left (12 a^4 A b^2-15 a^2 A b^4+6 A b^6-6 a^5 b B+5 a^3 b^3 B-2 a b^5 B+2 a^6 C+a^4 b^2 C\right ) (b+a \cos (c+d x))^3 \sec (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (-\frac {2 i \text {ArcTan}\left (\sec \left (\frac {d x}{2}\right ) \left (\frac {\cos (c)}{\sqrt {a^2-b^2} \sqrt {\cos (2 c)-i \sin (2 c)}}-\frac {i \sin (c)}{\sqrt {a^2-b^2} \sqrt {\cos (2 c)-i \sin (2 c)}}\right ) \left (-i b \sin \left (\frac {d x}{2}\right )+i a \sin \left (c+\frac {d x}{2}\right )\right )\right ) \cos (c)}{a^4 \sqrt {a^2-b^2} d \sqrt {\cos (2 c)-i \sin (2 c)}}-\frac {2 \text {ArcTan}\left (\sec \left (\frac {d x}{2}\right ) \left (\frac {\cos (c)}{\sqrt {a^2-b^2} \sqrt {\cos (2 c)-i \sin (2 c)}}-\frac {i \sin (c)}{\sqrt {a^2-b^2} \sqrt {\cos (2 c)-i \sin (2 c)}}\right ) \left (-i b \sin \left (\frac {d x}{2}\right )+i a \sin \left (c+\frac {d x}{2}\right )\right )\right ) \sin (c)}{a^4 \sqrt {a^2-b^2} d \sqrt {\cos (2 c)-i \sin (2 c)}}\right )}{\left (-a^2+b^2\right )^2 (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) (a+b \sec (c+d x))^3}+\frac {(b+a \cos (c+d x)) \sec (c) \sec (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (-A b^5 \sin (c)+a b^4 B \sin (c)-a^2 b^3 C \sin (c)+a A b^4 \sin (d x)-a^2 b^3 B \sin (d x)+a^3 b^2 C \sin (d x)\right )}{a^4 \left (a^2-b^2\right ) d (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) (a+b \sec (c+d x))^3}+\frac {(b+a \cos (c+d x))^2 \sec (c) \sec (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (9 a^2 A b^4 \sin (c)-6 A b^6 \sin (c)-7 a^3 b^3 B \sin (c)+4 a b^5 B \sin (c)+5 a^4 b^2 C \sin (c)-2 a^2 b^4 C \sin (c)-8 a^3 A b^3 \sin (d x)+5 a A b^5 \sin (d x)+6 a^4 b^2 B \sin (d x)-3 a^2 b^4 B \sin (d x)-4 a^5 b C \sin (d x)+a^3 b^3 C \sin (d x)\right )}{a^4 \left (a^2-b^2\right )^2 d (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) (a+b \sec (c+d x))^3}+\frac {2 A (b+a \cos (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \tan (c+d x)}{a^3 d (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) (a+b \sec (c+d x))^3} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.71, size = 398, normalized size = 1.21
method | result | size |
derivativedivides | \(\frac {-\frac {2 \left (-\frac {A a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}+\left (3 A b -B a \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{a^{4}}-\frac {2 \left (\frac {-\frac {\left (8 a^{2} A \,b^{2}+a A \,b^{3}-4 A \,b^{4}-6 a^{3} b B -a^{2} b^{2} B +2 a \,b^{3} B +4 a^{4} C +a^{3} b C \right ) a b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 \left (a -b \right ) \left (a^{2}+2 a b +b^{2}\right )}+\frac {b a \left (8 a^{2} A \,b^{2}-a A \,b^{3}-4 A \,b^{4}-6 a^{3} b B +a^{2} b^{2} B +2 a \,b^{3} B +4 a^{4} C -a^{3} b C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a -b \right )^{2}}}{\left (a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-a -b \right )^{2}}-\frac {\left (12 A \,a^{4} b^{2}-15 a^{2} A \,b^{4}+6 A \,b^{6}-6 a^{5} b B +5 a^{3} b^{3} B -2 a \,b^{5} B +2 a^{6} C +a^{4} b^{2} C \right ) \arctanh \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a^{4}}}{d}\) | \(398\) |
default | \(\frac {-\frac {2 \left (-\frac {A a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}+\left (3 A b -B a \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{a^{4}}-\frac {2 \left (\frac {-\frac {\left (8 a^{2} A \,b^{2}+a A \,b^{3}-4 A \,b^{4}-6 a^{3} b B -a^{2} b^{2} B +2 a \,b^{3} B +4 a^{4} C +a^{3} b C \right ) a b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 \left (a -b \right ) \left (a^{2}+2 a b +b^{2}\right )}+\frac {b a \left (8 a^{2} A \,b^{2}-a A \,b^{3}-4 A \,b^{4}-6 a^{3} b B +a^{2} b^{2} B +2 a \,b^{3} B +4 a^{4} C -a^{3} b C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a -b \right )^{2}}}{\left (a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-a -b \right )^{2}}-\frac {\left (12 A \,a^{4} b^{2}-15 a^{2} A \,b^{4}+6 A \,b^{6}-6 a^{5} b B +5 a^{3} b^{3} B -2 a \,b^{5} B +2 a^{6} C +a^{4} b^{2} C \right ) \arctanh \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{2 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a^{4}}}{d}\) | \(398\) |
risch | \(\text {Expression too large to display}\) | \(1891\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 811 vs.
\(2 (307) = 614\).
time = 2.98, size = 1680, normalized size = 5.09 \begin {gather*} \left [\frac {4 \, {\left (B a^{9} - 3 \, A a^{8} b - 3 \, B a^{7} b^{2} + 9 \, A a^{6} b^{3} + 3 \, B a^{5} b^{4} - 9 \, A a^{4} b^{5} - B a^{3} b^{6} + 3 \, A a^{2} b^{7}\right )} d x \cos \left (d x + c\right )^{2} + 8 \, {\left (B a^{8} b - 3 \, A a^{7} b^{2} - 3 \, B a^{6} b^{3} + 9 \, A a^{5} b^{4} + 3 \, B a^{4} b^{5} - 9 \, A a^{3} b^{6} - B a^{2} b^{7} + 3 \, A a b^{8}\right )} d x \cos \left (d x + c\right ) + 4 \, {\left (B a^{7} b^{2} - 3 \, A a^{6} b^{3} - 3 \, B a^{5} b^{4} + 9 \, A a^{4} b^{5} + 3 \, B a^{3} b^{6} - 9 \, A a^{2} b^{7} - B a b^{8} + 3 \, A b^{9}\right )} d x + {\left (2 \, C a^{6} b^{2} - 6 \, B a^{5} b^{3} + {\left (12 \, A + C\right )} a^{4} b^{4} + 5 \, B a^{3} b^{5} - 15 \, A a^{2} b^{6} - 2 \, B a b^{7} + 6 \, A b^{8} + {\left (2 \, C a^{8} - 6 \, B a^{7} b + {\left (12 \, A + C\right )} a^{6} b^{2} + 5 \, B a^{5} b^{3} - 15 \, A a^{4} b^{4} - 2 \, B a^{3} b^{5} + 6 \, A a^{2} b^{6}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (2 \, C a^{7} b - 6 \, B a^{6} b^{2} + {\left (12 \, A + C\right )} a^{5} b^{3} + 5 \, B a^{4} b^{4} - 15 \, A a^{3} b^{5} - 2 \, B a^{2} b^{6} + 6 \, A a b^{7}\right )} \cos \left (d x + c\right )\right )} \sqrt {a^{2} - b^{2}} \log \left (\frac {2 \, a b \cos \left (d x + c\right ) - {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right ) + 2 \, a^{2} - b^{2}}{a^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + b^{2}}\right ) + 2 \, {\left ({\left (2 \, A - 3 \, C\right )} a^{7} b^{2} + 5 \, B a^{6} b^{3} - {\left (13 \, A - 3 \, C\right )} a^{5} b^{4} - 7 \, B a^{4} b^{5} + 17 \, A a^{3} b^{6} + 2 \, B a^{2} b^{7} - 6 \, A a b^{8} + 2 \, {\left (A a^{9} - 3 \, A a^{7} b^{2} + 3 \, A a^{5} b^{4} - A a^{3} b^{6}\right )} \cos \left (d x + c\right )^{2} + {\left (4 \, {\left (A - C\right )} a^{8} b + 6 \, B a^{7} b^{2} - 5 \, {\left (4 \, A - C\right )} a^{6} b^{3} - 9 \, B a^{5} b^{4} + {\left (25 \, A - C\right )} a^{4} b^{5} + 3 \, B a^{3} b^{6} - 9 \, A a^{2} b^{7}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{4 \, {\left ({\left (a^{12} - 3 \, a^{10} b^{2} + 3 \, a^{8} b^{4} - a^{6} b^{6}\right )} d \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{11} b - 3 \, a^{9} b^{3} + 3 \, a^{7} b^{5} - a^{5} b^{7}\right )} d \cos \left (d x + c\right ) + {\left (a^{10} b^{2} - 3 \, a^{8} b^{4} + 3 \, a^{6} b^{6} - a^{4} b^{8}\right )} d\right )}}, \frac {2 \, {\left (B a^{9} - 3 \, A a^{8} b - 3 \, B a^{7} b^{2} + 9 \, A a^{6} b^{3} + 3 \, B a^{5} b^{4} - 9 \, A a^{4} b^{5} - B a^{3} b^{6} + 3 \, A a^{2} b^{7}\right )} d x \cos \left (d x + c\right )^{2} + 4 \, {\left (B a^{8} b - 3 \, A a^{7} b^{2} - 3 \, B a^{6} b^{3} + 9 \, A a^{5} b^{4} + 3 \, B a^{4} b^{5} - 9 \, A a^{3} b^{6} - B a^{2} b^{7} + 3 \, A a b^{8}\right )} d x \cos \left (d x + c\right ) + 2 \, {\left (B a^{7} b^{2} - 3 \, A a^{6} b^{3} - 3 \, B a^{5} b^{4} + 9 \, A a^{4} b^{5} + 3 \, B a^{3} b^{6} - 9 \, A a^{2} b^{7} - B a b^{8} + 3 \, A b^{9}\right )} d x + {\left (2 \, C a^{6} b^{2} - 6 \, B a^{5} b^{3} + {\left (12 \, A + C\right )} a^{4} b^{4} + 5 \, B a^{3} b^{5} - 15 \, A a^{2} b^{6} - 2 \, B a b^{7} + 6 \, A b^{8} + {\left (2 \, C a^{8} - 6 \, B a^{7} b + {\left (12 \, A + C\right )} a^{6} b^{2} + 5 \, B a^{5} b^{3} - 15 \, A a^{4} b^{4} - 2 \, B a^{3} b^{5} + 6 \, A a^{2} b^{6}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (2 \, C a^{7} b - 6 \, B a^{6} b^{2} + {\left (12 \, A + C\right )} a^{5} b^{3} + 5 \, B a^{4} b^{4} - 15 \, A a^{3} b^{5} - 2 \, B a^{2} b^{6} + 6 \, A a b^{7}\right )} \cos \left (d x + c\right )\right )} \sqrt {-a^{2} + b^{2}} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )}}{{\left (a^{2} - b^{2}\right )} \sin \left (d x + c\right )}\right ) + {\left ({\left (2 \, A - 3 \, C\right )} a^{7} b^{2} + 5 \, B a^{6} b^{3} - {\left (13 \, A - 3 \, C\right )} a^{5} b^{4} - 7 \, B a^{4} b^{5} + 17 \, A a^{3} b^{6} + 2 \, B a^{2} b^{7} - 6 \, A a b^{8} + 2 \, {\left (A a^{9} - 3 \, A a^{7} b^{2} + 3 \, A a^{5} b^{4} - A a^{3} b^{6}\right )} \cos \left (d x + c\right )^{2} + {\left (4 \, {\left (A - C\right )} a^{8} b + 6 \, B a^{7} b^{2} - 5 \, {\left (4 \, A - C\right )} a^{6} b^{3} - 9 \, B a^{5} b^{4} + {\left (25 \, A - C\right )} a^{4} b^{5} + 3 \, B a^{3} b^{6} - 9 \, A a^{2} b^{7}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{2 \, {\left ({\left (a^{12} - 3 \, a^{10} b^{2} + 3 \, a^{8} b^{4} - a^{6} b^{6}\right )} d \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{11} b - 3 \, a^{9} b^{3} + 3 \, a^{7} b^{5} - a^{5} b^{7}\right )} d \cos \left (d x + c\right ) + {\left (a^{10} b^{2} - 3 \, a^{8} b^{4} + 3 \, a^{6} b^{6} - a^{4} b^{8}\right )} d\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \cos {\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{3}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 667 vs.
\(2 (307) = 614\).
time = 0.56, size = 667, normalized size = 2.02 \begin {gather*} \frac {\frac {{\left (2 \, C a^{6} - 6 \, B a^{5} b + 12 \, A a^{4} b^{2} + C a^{4} b^{2} + 5 \, B a^{3} b^{3} - 15 \, A a^{2} b^{4} - 2 \, B a b^{5} + 6 \, A b^{6}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{{\left (a^{8} - 2 \, a^{6} b^{2} + a^{4} b^{4}\right )} \sqrt {-a^{2} + b^{2}}} + \frac {4 \, C a^{5} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 6 \, B a^{4} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, C a^{4} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 8 \, A a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 5 \, B a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - C a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 7 \, A a^{2} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, B a^{2} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 5 \, A a b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, B a b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 4 \, A b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 \, C a^{5} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, B a^{4} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, C a^{4} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 8 \, A a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5 \, B a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + C a^{3} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 7 \, A a^{2} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, B a^{2} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5 \, A a b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, B a b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4 \, A b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a^{7} - 2 \, a^{5} b^{2} + a^{3} b^{4}\right )} {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a - b\right )}^{2}} + \frac {{\left (B a - 3 \, A b\right )} {\left (d x + c\right )}}{a^{4}} + \frac {2 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )} a^{3}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.07, size = 2500, normalized size = 7.58 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________